package models;

/**
 * Created by Dominik on 2014-10-18. Changed by Agnieszka on 2014-10-19.
 */
public class Player {

    public static int PLAYER_IN_GAME = 0;
    public static int PLAYER_OUT_OF_GAME = -1;
    public static int PLAYER_PLAYED_ALLIN = 1;
    public static int PLAYER_PERMAMENTLY_OUT_OF_GAME = -2;

    private String name;
    private int number;
    private int playersCoins;
    private int bet = 0;
    private int status = PLAYER_IN_GAME;
    private Hand PlayerHand;

    public Player(String name, int number, int startingCoins, Deck2 deck) {

	this.name = name;
	this.number = number;
	this.playersCoins = startingCoins;
	this.PlayerHand = new Hand(deck, number);

    }

    public String getName() {
	return name;
    }

    public int getNumber() {
	return number;
    }

    public int getBet() {
	return bet;
    }

    public int getPlayersCoins() {
	return playersCoins;
    }

    public Hand getPlayersHand() {
	return PlayerHand;
    }

    public String getStringHand() {
	return PlayerHand.getString();
    }

    public int getStatus() {
	return status;
    }

    public void exchangeCards(Deck2 deck, int cardSet) {
	PlayerHand.changeCards(deck, number, cardSet);
    }

    public void setBet(int bet) {
	this.bet = bet;
    }

    public void setStatus(int status) {
	this.status = status;
    }

    public void setPlayersCoins(int coins) {
	this.playersCoins = coins;
    }

}
